package com.zyc.socket;

import com.zyc.annotation.RpcScan;
import com.zyc.socket.controller.HelloController;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author zyc
 * @create 2022--05--31 8:55
 */
@RpcScan(basePackage = "com.zyc")
public class ClientSpringAnnotation {
    public static void main(String[] args) {
        //通过注解自动调用客户端代理类，进一步屏蔽细节
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ClientSpringAnnotation.class);
        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
        HelloController helloController = (HelloController) applicationContext.getBean("helloController");
        helloController.test();
    }
}
